/*
package com.icss.train_sys_back.Interceptor;

import cn.dev33.satoken.stp.StpUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.servlet.HandlerInterceptor;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

*/
/**
 * 登录拦截器
 * 除登录请求外，其他请求需要验证登录状态
 *//*

@Slf4j
public class LoginInterceptor implements HandlerInterceptor {

    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
        log.info("请求路径：{}", request.getRequestURI());
        // 排除登录请求
        if (request.getRequestURI().contains("/login")) {
            return true;
        }
        // 验证登录状态
        try {
            log.info("SaToken 验证是否登录 {}",StpUtil.isLogin());
        }catch (Exception e){
            log.info("拦截器异常 e = {}",e.getMessage());
            return false;
        }
        return StpUtil.isLogin();
    }
}
*/
